// 禁用菜单项
.fucking-menu .is-disabled {
  color: $menu-item-disabled-color;
  pointer-events: none;
  cursor: default; // 禁用鼠标样式
}

.fucking-menu {
  display: flex;
  flex-wrap: wrap; // 子元素换行
  padding-left: 0; // 去除ul的默认padding
  margin-bottom: 30px;
  list-style: none; // 去除ul的默认样式
  border-bottom: $menu-border-width solid $menu-border-color;
  box-shadow: $menu-box-shadow;

  .is-vertical {
    .arrow-icon {
      transform: rotate(0deg) !important;
    }

    &.is-opened {
      .arrow-icon {
        transform: rotate(180deg) !important;
      }
    }
  }

  > .menu-item {
    padding: $menu-item-padding-y $menu-item-padding-x;
    cursor: pointer;
    transition: $menu-transition; // 过渡效果

    &:hover,
    &:focus {
      text-decoration: none;
    }

    &.is-active,
    &:hover {
      color: $menu-item-active-color;
      border-bottom: $menu-item-active-border-width solid $menu-item-active-color;
    }
  }

  // drop 子菜单
  .submenu-item {
    position: relative;

    .submenu-title {
      display: flex;
      align-items: center;
    }

    .arrow-icon {
      transition: transform 0.25s ease-in-out;
      margin-left: 3px;
    }

    &:hover {
      .arrow-icon {
        transform: rotate(180deg);
      }
    }
  }
}

.fucking-submenu {
  // display: none;
  // transition: $menu-transition;
  list-style: none;
  padding-left: 0;
  white-space: nowrap;

  .menu-item {
    padding: $menu-item-padding-y $menu-item-padding-x;
    cursor: pointer;
    transition: $menu-transition;
    color: $body-color;

    &.is-active,
    &:hover {
      color: $menu-item-active-color !important;
    }
  }
}

.fucking-submenu.menu-opened {
  // display: block;
}

// 水平菜单
.menu-horizontal {
  > .menu-item {
    border-bottom: $menu-item-active-border-width solid transparent;
  }

  .fucking-submenu {
    position: absolute;
    background: $white;
    z-index: 100;
    top: calc(100% + 8px);
    left: 0;
    border: $menu-border-width solid $menu-border-color;
    box-shadow: $submenu-box-shadow;
  }
}

// 垂直菜单
.menu-vertical {
  flex-direction: column;
  border-bottom: 0px;
  margin: 10px 20px;
  border-right: $menu-border-width solid $menu-border-color;

  > .menu-item {
    border-left: $menu-item-active-border-width solid transparent;

    &.is-active,
    &:hover {
      border-bottom: 0px;
      border-left: $menu-item-active-border-width solid $menu-item-active-color;
    }
  }
}
